<template>
  <div class="more-action">
    <!-- 状态一 -->
    <van-cell-group v-if="Select">
      <van-cell @click="No_interest">不感兴趣</van-cell>
      <van-cell is-link @click="Switch">反馈垃圾内容</van-cell>
      <van-cell>拉黑作者</van-cell>
    </van-cell-group>
    <!-- 状态二 反馈-->
    <van-cell-group v-else>
      <van-cell icon="arrow-left" @click="ReTurn">返回</van-cell>
      <van-cell
        v-for="report in reports"
        :key="report.value"
        @click="hReport(item.value)"
      >
        {{ report.label }}
      </van-cell>
    </van-cell-group>
  </div>
</template>

<script>
import reports from '@/constant/reports.js'
export default {
  name: 'MoreAction',
  data () {
    return {
      reports: reports,
      Select: true
    }
  },
  methods: {
    Switch () {
      this.Select = false
    },
    ReTurn () {
      this.Select = true
    },
    No_interest () {
      this.$emit('No_interest')
    },
    hReport (typeId) {
      // 子传父：
      // this.$emit('事件名', 实参)
      this.$emit('report', typeId)
    }
  }
}
</script>
